package com.SwaggerTest.BaseTest;


import com.SwaggerTest.bean.Parent;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

/**
 * Spring 使用JUnit 框架 并使用Ioc注入功能
 */
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@RunWith(SpringRunner.class)
public class SpringBootIocWithJunit {
    @Autowired
    Parent parent;
    @Test
    public void TestSpringBootIOCWhitJUnit()
    {
        System.out.println(parent);
    }

}
